Xbasic

SYSTEM_EVENT_DATA_GET Function

Syntax

Data as P = SYSTEM_EVENT_DATA_GET()

Arguments

Data

A dot variable that receives the contents of the database_exit variable.

Description

The SYSTEM_EVENT_DATA_GET() returns a pointer to system events that have been registered by the CAN_DATABASE_EXIT()and ON_DATABASE_EXIT()functions.

Example

The following script registers events.

code = 
Ui_msg_box("Notice", "The database is about to close - First warning")
%code%
on_database_exit(code)
Code2 = 
Ui_msg_box("Notice", "The database is now closing - Second warning")
%code%
on_database_exit(code2)

This code returns the registered events.

dim ptr as P
ptr = system_event_data_get()
? ptr.database_exit
= +1.
+2.
? ptr.database_exit.1
= code = Ui_msg_box("Notice", "The database is about to close - First warning")
level = "Application"
? ptr.database_exit.2
= code = Ui_msg_box("Notice", "The database is now closing - Second warning")
level = "Application"

This code drops the second database_exit event.

system_event_drop("database_exit", "2")

See Also